<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class RemoveMuticolumnIdAndAndDataTypeToApppageRectplsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('apppage_rectpls', function (Blueprint $table) {
            if (Schema::hasColumn('apppage_rectpls', 'muticolumn_id')) {
                $table->dropColumn('muticolumn_id');
            }
            $table->integer('data_type')->default(0)->unsigned()->comment('数据类型');
            $table->integer('data_id')->default(0)->unsigned()->comment('数据ID');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
